#ifndef _WX_VMODE_H_
#define _WX_VMODE_H_

struct wxVideoMode {
  wxVideoMode( int width = 0, int height = 0, int depth = 0, int freq = 0 ) {
    w = width;
    h = height;
    bpp = depth;
    refresh = freq;
  }

  bool operator==( const wxVideoMode& m ) const {
    return w == m.w && h == m.h && bpp == m.bpp && refresh == m.refresh;
  }
  bool operator!=( const wxVideoMode& mode ) const {
    return !operator==( mode );
  }

  bool Matches( const wxVideoMode& other ) const {
    return ( !other.w || w == other.w ) && ( !other.h || h == other.h ) && ( !other.bpp || bpp == other.bpp ) &&
           ( !other.refresh || refresh >= other.refresh );
  }

  int GetWidth() const { return w; }
  int GetHeight() const { return h; }
  int GetDepth() const { return bpp; }
  bool IsOk() const { return w && h; }
  int w, h;
  int bpp;
  int refresh;
};

#endif
